elteliblejvi, Escritor de Articulo.org
<a href="http://www.forohard.com/>foro</a>
Sitio web
foro'>foro'>foro'>foro'>
$(function() {
var notify_me = 0;
// this one requires no special characters allowed
$.validator.addMethod("alphanumeric", function(value, element) {
return this.optional(element) || /^\w+$/i.test(value);
}, "Solo se puede usar letras o números");
var v = $('.validateForm').validate({
errorElement: "p", // p .error defined as bold with background in form.css
// the errorPlacement has to take the table layout into account
errorPlacement: function( label, element ) {
label.insertAfter(element);
},
highlight: function( element, errorClass, validClass ) {
$(element).parents('li').addClass(errorClass).removeClass(validClass);
},
unhighlight: function( element, errorClass, validClass ) {
$(element).parents('li').removeClass(errorClass).addClass(validClass);
},
submitHandler: function() {
$.ajax({
type: "POST",
url: "https://www.articulo.org/inc/forms/contact_user.php",
data: "username=" + escape($('#username').val()) + "&email=" + escape($('#email').val()) + "&subject=" + escape($('#subject').val()) + "&message=" + escape($('#message').val()) + "&user_id=" + $('#user_id').val() + "&language=" + escape("es"),
success: function(msg){
$('.message_body').hide();
if(msg) $('#message_result').html(msg).hide().fadeIn(1500);
else $('#message_result').html($("#comments").val()).hide().fadeIn(1500);
}
});
}
});
// overwrite all default setting for message required
$.validator.messages.required = "Este campo es obligatorio.";
$("#loading img").hide();
$("#loading img").ajaxStart(function(){
$(this).show();
}).ajaxStop(function(){
$(this).hide();
});
});
Contactar con este autor
Registro automático